<?php

class Model_DbTable_Apos_Grnnote extends Zend_Db_Table_Abstract {
	
	public function getGrnDate($GrnNo){
		
		$whereStr ="GRN_NO = '".$GrnNo."'";
		$row = $this->fetchRow($whereStr,"GRN_NO ASC");

		if(!$row) {return false;}
		
		return $row["DATE"];
	}
	/**
	 * @author Leo
	 * @version 2014-07-09
	 * @param date $dateBegin
	 * @param date $dateEnd
	 * get all GRN detail between a period
	 */
	
	
	public function getGrnByDate($dateBegin,$dateEnd){
	
		$whereStr ="DATE between '".$dateBegin."'"." AND '".$dateEnd."'";
		$row = $this->fetchAll($whereStr,"GRN_NO ASC");
	
		if(!$row) {
			return false;
		}
	
		return $row->toArray();
	}
	
}

?>